package cc.android.testapp.ui.listbase;

import android.support.annotation.NonNull;

public abstract class LineData implements Comparable<LineData> {

    public abstract String getId();

    public int getWeight() {
        return 0;
    }

    @Override
    public int compareTo(@NonNull LineData pOther) {
        int tR= this.getWeight() - pOther.getWeight();
        return tR==0?getId().compareTo(pOther.getId()):tR;
    }
}
